import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';

import nodejs from '@dfeidao/atom-web/msg/nodejs';

import set from '@dfeidao/atom-web/local/set';
import render from '@dfeidao/atom-web/render/render';
import p001 from './p001';


export default async function a001(fd: IFeidaoAiBrowserComponent, knowledge_name: string, flags: string,knowledge_no: string) {
	// todo

	const detil = fd.data.node.querySelector<HTMLDivElement>('[data-id="detail"]');
	set_node_cls(detil, 'display-n', false);

	const res = await nodejs('knowledge-base/zj-000003/s001', {
		filter: {
			knowledge_name
		}
	});

	render(fd, res, p001, 'p001', 'inner');

	set(fd, 'res', res);
	set(fd, 'knowledge_no', knowledge_no);
	set(fd, 'flags', flags);


}
